import { UserInfo } from '../index'
import UserInfoStore from '@/stores/modules/UserInfoStore';
const store = UserInfoStore();

// 所有用户信息
export async function Info() {
    try {
        const response = await UserInfo.Info();
        const info = response.data.data;
        await store.Info(info);
    } catch (error) {
        console.log(error);
    }
}

export async function SearchUserInfo(data) {
    try {
        const response = await UserInfo.Search(data);
        const info = response.data.data;

        await store.Info(info);
    } catch (error) {
        console.log(error);
    }
}

export async function Del(data) {
    try {
        await UserInfo.Del(data);
    } catch (error) {
        console.log(error);
    }
}